package Service;

import Model.Department;
import Model.DepartmentChanged;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.io.InputStream;

public interface DepartmentService {
    List<Department> getAllDepartmentList();
    List<DepartmentChanged> getAllDepartmentChangedList();
    /**
     * 删除机构以及它对应的权限
     * @param id
     * @return
     */
    String delDepartment(int id);

    /**
     * 搜索-信息页面
     * @param departmentName
     * @param regionCode
     * @param status
     * @return
     */
    List<Department> findDepartmentInfo(@Param("departmentName")String departmentName, @Param("regionCode")String regionCode, @Param("status")String status);

    /**
     * 搜索-变更页面
     * @param nameSearch
     * @param settleCodeSearch
     * @param titleSearch
     * @return
     */
    List<DepartmentChanged> findChangedInfo(@Param("nameSearch")String nameSearch,
                                            @Param("settleCodeSearch")String settleCodeSearch,
                                            @Param("titleSearch")String titleSearch);

    Department findDepartmentInfobyID(Integer id);

    List<Department> findOrgInfobySettleCode(String settleCode);

    String updateDepartment(Department department, HttpSession session);

    String InputExcel(InputStream is, String originalFilename);
    //
    List<Department> OutputExcel();
    //
    List<Department> getAll();

}
